package boxe.timer;

/**
 * The run define the color, the duration and the sounds
 * It has three state
 *  - latance -> before the run
 *  - run -> the run
 *  - wait -> after the run
 * 
 * @author Julien Perriard
 * @date 25.05.2010
 *
 */


import java.awt.Color;

public class Run {

	private String name = "";
	private long duration = 0;
	private Color background;
	private String sndStart = "";
	private String sndStop = "";
	private long currentTime = 0;
	private int breakTime = 0;
	private long endRunWarning = 0;
	private Color endRunColor;
	private String sndEndRun = "";
	private String description;
	
	/**
	 * Constructor
	 */
	public Run() {
	}
	
	public Run(String name, int duration) {
		this.name = name;
		this.duration = duration;
	}

	
	/**
	 * Getters and Setters
	 * @return
	 */
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public long getDuration() {
		return duration;
	}

	public void setDuration(long duration) {
		this.duration = duration;
	}

	public long getCurrentTime() {
		return currentTime;
	}

	public void setCurrentTime(long currentTime) {
		this.currentTime = currentTime;
	}

	public int getBreakTime() {
		return breakTime;
	}

	public void setBreakTime(int breakTime) {
		this.breakTime = breakTime;
	}
	
	public long getEndRunWarning() {
		return endRunWarning;
	}
	
	public void setEndRunWarning(long endRunWarning) {
		this.endRunWarning = endRunWarning;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public Color getEndRunColor() {
		return endRunColor;
	}
	
	public void setEndRunColor(Color endRunColor) {
		this.endRunColor = endRunColor;
	}
	
	public String getSndEndRun() {
		return sndEndRun;
	}
	
	public void setSndEndRun(String sndEndRun) {
		this.sndEndRun = sndEndRun;
	}
	
	public boolean isEndRun() {
		if(endRunWarning > 0) {
			return true;
		}
		return false;
	}
	
	public Color getBackground() {
		return background;
	}
	
	public void setBackground(Color background) {
		this.background = background;
	}
	
	public String getSndStart() {
		return sndStart;
	}
	
	public void setSndStart(String sndStart) {
		this.sndStart = sndStart;
	}
	
	public String getSndStop() {
		return sndStop;
	}
	
	public void setSndStop(String sndStop) {
		this.sndStop = sndStop;
	}
}
